/**
 * 
 */
package soa.security.dao;

import java.util.List;

import javax.naming.Name;

import org.springframework.ldap.query.SearchScope;

/**
 * @author CreGu
 * @param <T>
 *
 */
public interface SpringLdapDao<T> {

	void create(T t);

	void update(T t);

	void deleteByDn(String dn);

	T findByDn(String dn);

	T findByPrimaryKey(String baseDn, String id);

	List<T> findAllByAttr(String baseDn, SearchScope searchScope,
			String attrName, String attrValue);

	String getObjectClass();

	void addAttrName(Name dn, String attrName, String attrValue);

	void removeAttrName(Name dn, String attrName, String attrValue);

	List<String> allAttrName(Name dn, String attrName);
}
